Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.cetask.guide
Class Guide

    java.lang.Object
      edu.wpi.cetask.guide.Guide

Direct Known Subclasses:
  SpeechGuide

    public class Guide

extends Object

Nested Class Summary
`protected static class` | `Guide.Quit`

Field Summary
`protected Plan` | `accepted`
`protected String` | `command`
`protected TaskEngine` | `engine`
`static String` | `PROMPT`
`protected Plan` | `proposed`
`protected Plan` | `rejected`
`static String` | `VERSION`

Constructor Summary
`protected` | `Guide(String filename)`

Method Summary
`void` | `by(String args)` Select decomposition class for current focus task.
`void` | `clear(String ignore)` Reinitialize current task state (but keeps loaded models).
`protected void` | `deallocate()`
`void` | `debug(String state)` Control debugging output.
`void` | `done(String args)` Report user performance of primitive task.
`void` | `eval(String script)` Evaluate given JavaScript code and report return value.
`protected static void` | `exception(Throwable e)`
`void` | `execute(String args)` Like 'done', but first executes script associated with primitive task, if any.
`protected void` | `help()`
`void` | `help(String ignore)`
`void` | `load(String uri)` Load, parse and validate specified task model.
`protected void` | `loop()` Command loop.
`static void` | `main(String[] args)`
`void` | `next(String ignore)` Advise the user what needs to be done next.
`void` | `no(String ignore)` Reject system proposals.
`protected void` | `println(Object object)`
`protected void` | `processCommand(String line)`
`protected void` | `propose(Plan plan)`
`protected void` | `respond(String key)`
`void` | `source(String filename)` Start reading user input from given file.
`void` | `status(String ignore)` Print out current task decomposition tree with status information.
`protected void` | `system()` Method for system turn.
`void` | `task(String args)` Set current task focus.
`void` | `verbose(String state)` Control verbose output.
`protected static void` | `warning(String text)`
`void` | `yes(String ignore)` Accept system proposals.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### VERSION

    public static String VERSION

### engine

    protected final TaskEngine engine

### PROMPT

    public static String PROMPT

### proposed

    protected Plan proposed

### accepted

    protected Plan accepted

### rejected

    protected Plan rejected

### command

    protected String command

Constructor Detail

### Guide

    protected Guide(String filename)

Method Detail

### main

    public static void main(String[] args)

### loop

    protected void loop()

  Command loop. Uses reflection to invoke commands; see methods with command names.

### deallocate

    protected void deallocate()

### processCommand

    protected void processCommand(String line)
                           throws Throwable

  Throws:
    `Throwable`

### respond

    protected void respond(String key)

### println

    protected void println(Object object)

### warning

    protected static void warning(String text)

### exception

    protected static void exception(Throwable e)

### system

    protected void system()

  Method for system turn. Called once each time around command loop. Intended extension point.

### propose

    protected void propose(Plan plan)

### help

    public void help(String ignore)

### help

    protected void help()

### load

    public void load(String uri)

  Load, parse and validate specified task model.

  Parameters:
    `uri` - for xml file containing task model description

### task

    public void task(String args)

  Set current task focus. Namespace defaults to last loaded. JavaScript to compute all declared input and output slot values is optional (in order declared). Skipped slots can be specified by '/ /'.
  Hint: If Javascript contains '/', use 'eval' command to set temporary variable and use variable in 'done'.

  Parameters:
    `args` - <id> [<namespace>] [ / <value> ]*

### by

    public void by(String args)

  Select decomposition class for current focus task.

  Parameters:
    `args` - <id>

### done

    public void done(String args)

  Report user performance of primitive task. Task class defaults to suggested next task. JavaScript to compute all declared input and output slot values is required (in order declared). Success slot value is optional (and last). Skipped slots can be specified by '/ /'.
  Hint: If Javascript contains '/', use 'eval' command to set temporary variable and use variable in 'done'.

  Parameters:
    `args` - [<id> [<namespace>]] [ / <value> ]*

### execute

    public void execute(String args)

  Like 'done', but first executes script associated with primitive task, if any. Convenient for running simulations.

  See Also:
    `done(String)`

### next

    public void next(String ignore)

  Advise the user what needs to be done next.

### yes

    public void yes(String ignore)

  Accept system proposals.

### no

    public void no(String ignore)

  Reject system proposals.

### eval

    public void eval(String script)
              throws javax.script.ScriptException

  Evaluate given JavaScript code and report return value.

  Throws:
    `javax.script.ScriptException`

### source

    public void source(String filename)

  Start reading user input from given file.

### status

    public void status(String ignore)

  Print out current task decomposition tree with status information.

### clear

    public void clear(String ignore)

  Reinitialize current task state (but keeps loaded models).

### verbose

    public void verbose(String state)

  Control verbose output.

  Parameters:
    `state` - - "true" or "false"

### debug

    public void debug(String state)

  Control debugging output.

  Parameters:
    `state` - - "true" or "false"

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD